#ifndef _ASSERT_H_
#define _ASSERT_H_

#if defined( DEBUG ) | defined( _DEBUG )

class Assert
{
	public:
		static void CustomAssert( bool condition, int lineNumber, const char* fileName );
		static void CustomAssert( bool condition, char* description, ... );
		static void CustomNullAssert( void* pointer, int lineNumber, const char* fileName );
		static void CustomNullAssert( void* pointer, char* description, ... );
};

/**
* @brief					Check if condition is true. If given condition is false, then it stops the program
* @param[in] condition		a boolean condition to check. 
*/
#define ASSERT( condition ) do { Assert::CustomAssert( condition, __LINE__, __FILE__ ); } while ( 0 )

/**
* @brief					Check if condition is true. If given condition is false, then it stops the program
* @param[in] condition		a boolean condition to check. 
* @param[in] description	Message to display in debugger if the program breaks.
*/
#define ASSERT_MSG( condition, description, ... ) do { Assert::CustomAssert( condition, description, __VA_ARGS__ ); } while ( 0 )

/**
* @brief					Check if condition is true. If given pointer is NULL, then it stops the program
* @param[in] condition		a boolean condition to check. 
*/
#define NULL_ASSERT( pointer ) do { Assert::CustomNullAssert( pointer, __LINE__, __FILE__ ); } while ( 0 )

/**
* @brief					Check if pointer is NULL. If it is , then it stops the program
* @param[in] condition		a boolean condition to check. 
* @param[in] description	Message to display in debugger if the program breaks.
*/
#define NULL_ASSERT_MSG( pointer, description, ... ) do { Assert::CustomNullAssert( pointer, description, __VA_ARGS__ ); } while ( 0 )


#else
	#define ASSERT( condition, description, ... )
	#define ASSERT_MSG( condition, description, ... )
	#define NULL_ASSERT( pointer )
	#define NULL_ASSERT_MSG( pointer, description, ... )
#endif

#endif // end of _ASSERT_H_